/* eslint-disable */

/*
 * @Date: 2021-12-24 11:40:08
 * @LastEditors: Drc
 * @LastEditTime: 2021-12-24 19:33:12
 */

import _ from 'lodash'

//匹配值替换输出
Array.prototype.transTo = function (targetList: any[]) {
  let _this = _.cloneDeep(this)
  let _targetList = _.cloneDeep(targetList)
  return {
    with: function (target: any) {
      const index = _this.findIndex((item: any) => item === target)
      return index === -1 ? undefined : _targetList[index]
    },
  }
}

export default {}
